neattui(5)

# NAME

neattui.conf - configuration format for neattui programs

# SYNTAX

Comments begin with '#' or ';'.

The config file is parsed as a set of key-value pairs divided into sections.

Sections are defined on a single line with their name in brackets. For example:

```
[SectionName]
key-value pairs
[OtherSectionName]
more key-value pairs
```

Key-value pairs are defined by separating the key and value with '=' or ':',
optionally surrounded by space. For example:

```
key = value
key2="other value"
key3:test
```

The value is always a string and can be enclosed in double quotes ('"').
Enclosing the value in triple double quotes ('"""') creates multiline strings.
Escape sequences (e.g. '\\n') are processed in single- and multiline strings.
This can be disabled for all strings by prefixing the initial double quote with
'r'. If a value is single-line and *not* prefixed with 'r', double quotes are
optional. For example:

```
key="""multi
line value"""
key2=r"not escaped \\n"
key3=r"""not escaped
\\n either!!
"""
key4= optional quotes!
key5 = space around =
```

# KEY-VALUE PAIRS

Unless otherwise specified, length refers to the amount of consecutive cells in
your terminal that a string takes up. A _char_ refers to a single cell in your
terminal. Most Unicode codepoints are a single _char_. A character also refers
to a single cell in your terminal. A _string_ is a sequence of characters.

## TuiSingleSelection

```
selected = string
unSelected = string
```

_selected_ is shown next to a selection if it is currently selected, otherwise
_unSelected_ is shown instead. If the lengths of _selected_ and _unSelected_
are not equal, the behavior is undefined. Pad the shorter one with spaces to
your liking.

## Border

```
ulCorner = char
urCorner = char
blCorner = char
brCorner = char
uEdge = char
rEdge = char
bEdge = char
lEdge = char
```

_ulCorner_ is the character displayed in the upper left corner of a border.
_urCorner_ is likewise for the upper right corner, _blCorner_ is for the bottom
left corner, and _brCorner_ is for the bottom right corner.

_uEdge_ is the character repeated in the upper edge of the border, _rEdge_ is
likewise for the right edge, _bEdge_ is for the bottom edge, and _lEdge_ is for
the left edge.

# NOTES

Because of implementation semantics, a multicell _char_ is accepted in places
where a single terminal cell is expected. Providing a multicell _char_ *will*
break rendering and you should *not* ask for support. Properly filtering a
multicell _char_ is not possible, because of terminal features that can
combine multiple characters into one cell, where they would otherwise take two.

# ERRORS

In case of an error in the config or a missing key-value pair, the program will
usually crash and leave your terminal unusable without a reset. However opening
and immediately closing a program made with neattui should recover your
terminal session.

# LOCATION

The config file is located at either "$XDG_CONFIG_HOME/neat/tui.conf" or
"~/.config/neat/tui.conf" on non-Windows operating systems.

# SEE ALSO

For precise information about the location of the config file, see ++
https://nim-lang.org/docs/appdirs.html#getConfigDir

For precise information about the syntax, see ++
https://nim-lang.org/docs/parsecfg.html

# AUTHORS

This manual was written by orchy <orchy12@proton.me> and is licensed under
CC-BY-SA 4.0. See ++
https://creativecommons.org/licenses/by-sa/4.0

